-- GENERATED SPELL FOR [Tyranis Malem] --


function spell0_5643(pUnit, Event) --@Moonfire,n/a--
pUnit:FullCastSpellOnTarget(15798,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5643', 12000, 1)
end

function spell1_5643(pUnit, Event) --@Wrath,n/a--
pUnit:FullCastSpellOnTarget(9739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5643', 2000, 1)
end

function Sorts_5643(pUnit, Event)
local choix_sorts_5643 = math.random(0, 1)
if choix_sorts_5643 == 0 then
pUnit:RegisterEvent('spell0_5643', 1, 1)
end
if choix_sorts_5643 == 1 then
pUnit:RegisterEvent('spell1_5643', 1, 1)
end
end

function mob5643_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5643', math.random(1500, 3000), 1)
end

function mob5643_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5643_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5643_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5643, 1, 'mob5643_Action')
RegisterUnitEvent(5643, 2, 'mob5643_Leave')
RegisterUnitEvent(5643, 3, 'mob5643_Kill')
RegisterUnitEvent(5643, 4, 'mob5643_Die')
